#!/usr/bin/python

"""
This example tries out sizers for UI Layout.

based on tutorial from www.zetcode.com
"""

# -*- coding: utf-8 -*-

# absolute.py

import wx

class Example(wx.Frame):
  
    def __init__(self, parent, title):
        super(Example, self).__init__(parent, title=title, 
                                      size=(260, 180))
            
        self.InitUI()
        self.Centre()
        self.Show()     
        
    def InitUI(self):
    
        #panel = wx.Panel(self, -1)

        menubar = wx.MenuBar()
        filem = wx.Menu()
        editm = wx.Menu()
        helpm = wx.Menu()

        menubar.Append(filem, '&File')
        menubar.Append(editm, '&Edit')
        menubar.Append(helpm, '&Help')
        self.SetMenuBar(menubar)
        
        #Absolute positioning
        #wx.TextCtrl(panel, pos=(3, 3), size=(250, 150))
        #Using built in sizer of the Frame object.
        #We can use only one control/widget in the built in sizer for frame object
        #In this case child widget occupies all the space which not given to rest
        #of the controls like menu, toolbar and statusbar
        wx.TextCtrl(self)


if __name__ == '__main__':
  
    app = wx.App()
    Example(None, title='')
    app.MainLoop()
